package com.regex.web.entity.member;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.regex.web.entity.AutoIdBaseEntity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author mhy
 * @since 2020-08-27
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_member")
public class MemberDTO extends AutoIdBaseEntity implements Cloneable {

    private static final long serialVersionUID = 1L;

    /**
     * 手机号
     */
    @TableField("tel")
    private String tel;

    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 来源
     */
    @TableField("source")
    private String source;

    /**
     * 昵称
     */
    @TableField("nick_name")
    private String nickName;

    /**
     * 姓名
     */
    @TableField("name")
    private String name;

    /**
     * 头像
     */
    @TableField("head_pic")
    private String headPic;

    /**
     * 性别
     */
    @TableField("sex")
    private String sex;

    /**
     * 出生日期
     */
    @TableField("birthday")
    private String birthday;

    /**
     * token
     */
    @TableField("token")
    private String token;

    /**
     * open_id
     */
    @TableField("open_id")
    private String openId;

    /**
     * 已选择的业主id
     */
    @TableField("door_id")
    private Long doorId;

    /**
     * 已选小区id
     */
    @TableField("village_id")
    private Long villageId;

    /**
     * 用户状态
     */
    @TableField("state")
    private String state;

    @TableField("registerid")
    private String registerid;
    
    @TableField(exist = false)
    private String authState; // 认证状态
    @TableField(exist = false)
    private String authStateStr; // 认证状态描述
    @TableField(exist = false)
    private String villageName; 
    @TableField(exist = false)
    private String villageDataId;// 物业系统小区id
    @TableField(exist = false)
    private String doorName;

    @Override
    protected Serializable pkVal() {
        return super.pkVal();
    }


	private static MemberDTO memberDTO = new MemberDTO();
    
    public static MemberDTO getInstance() {
        try {
            return (MemberDTO) memberDTO.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return new MemberDTO();
    }

}
